	<div class="column half fl">
		
		<div class="box themed_box">
		<h2 class="box-header"><?php echo $title; ?></h2>

		<div class="box-content">
        <?php echo $this->session->flashdata('message'); ?>
		
        
        
        <form id="formtest" method="post" action="<?php echo site_url($form['action']); ?>">
            <?php if($table['value']<>"") { ?>
            <input type="hidden" name="id" value="<?php echo $table['value']['user_no']; ?>" />
            <?php } ?>
            <label class="form-label required"><?php echo $this->lang->line('user_no'); ?></label>
			<input id="form-no" class="form-field width60" name="no" type="text" <?php if($table['value']<>""){ ?> disabled="disabled" <?php }?>   value="<?php if($table['value']<>"") { echo $table['value']['user_no']; } ?> " maxlength="50"/>
            
			<label class="form-label required"><?php echo $this->lang->line('user_name'); ?></label>
			<input id="form-name" class="form-field width60" name="name" type="text" value="<?php if($table['value']<>"") { echo $table['value']['name']; } ?>" maxlength="100"/>
			
            <label class="form-label"> Gender (Click One Item ) </label>

			<p class="radiocheck">
			<input id="dateformat_eu" type="radio" value="Pria" name="gender" <?php if($table['value']<>"") { if($table['value']['gender']=='Pria') { echo 'checked="checked"';  }  } ?> />
			<label for="dateformat_eu">Pria</label>
	
			<input id="dateformat_am" type="radio" value="Wanita" name="gender" <?php if($table['value']<>"") { if($table['value']['gender']=='Wanita') { echo 'checked="checked"';  }  } ?> />
			<label for="dateformat_am">Wanita</label>
			</p>
            
            <label class="form-label"> Enabled (Click One Item ) </label>

			<p class="radiocheck">
			<input id="dateformat1_eu" type="radio" value="1" name="enabled" <?php if($table['value']<>"") { if($table['value']['enabled']==1) { echo 'checked="checked"';  }  } ?> />
			<label for="dateformat1_eu">Active</label>
	
			<input id="dateformat1_am" type="radio" value="0" name="enabled" <?php if($table['value']<>"") { if($table['value']['enabled']==0) { echo 'checked="checked"';  }  } ?> />
			<label for="dateformat1_am">Resign</label>
			</p>
            
			<label class="form-label"><?php echo $this->lang->line('birth'); ?></label>
			<input name="birthday" class="form-field datepicker" type="text" value="<?php if($table['value']<>"") { echo $table['value']['birthday']; } ?>" />
			
			<label class="form-label"><?php echo $this->lang->line('user_call'); ?></label>
			<input id="form-username" class="form-field width60" name="user_call" type="text" value="<?php if($table['value']<>"") { echo $table['value']['username']; } ?>" maxlength="100"/>
			
            <label class="form-label"><?php echo $this->lang->line('pos'); ?>/<?php echo $this->lang->line('division'); ?>(If TA or SE) <?php echo date('h:i:s'); ?></label> 
            <select id="select" name="pos" title="Select a category">
                    <option value="<?php if($table['value']<>"") { echo $table['value']['pos_id']; } ?>" ><?php if($table['value']<>"") { echo $table['value']['pos_name']; } ?></option>
    			<?php foreach($table['pos'] as $rowpos): ?>
                    <option value="<?php echo $rowpos['id']; ?>"><?php echo $rowpos['pos_name']; ?></option>
                <?php endforeach;?>
            </select>
            <select id="select" name="division" title="Select a category">
                    <option value="<?php if($table['value']<>"") { echo $table['value']['division_id']; } ?>" ><?php if($table['value']<>"") { echo $table['value']['div_name']; } ?></option>
    			<?php foreach($table['division'] as $rowdiv): ?>
                    <option value="<?php echo $rowdiv['div_id']; ?>"><?php echo $rowdiv['div_name']; ?></option>
                <?php endforeach;?>
            </select>
            <br /><br />
            <label class="form-label"><?php echo $this->lang->line('sales'); ?>(Click One Item )</label>
            <p class="radiocheck">
			<input id="dateformat2_eu" type="radio" value="1" name="sales" <?php if($table['value']<>"") { if($table['value']['sales']==1) { echo 'checked="checked"';  }  } ?> />
			<label for="dateformat2_eu">Yes</label>
	
			<input id="dateformat2_am" type="radio" value="0" name="sales" <?php if($table['value']<>"") { if($table['value']['sales']==0) { echo 'checked="checked"';  }  } ?> />
			<label for="dateformat2_am">No</label>
			</p>
            
            <label class="form-label"><?php echo $this->lang->line('group'); ?></label>
            <select id="select" name="group" title="Select a category">
                    <option value="<?php if($table['value']<>"") { echo $table['value']['group_id']; } ?>" ><?php if($table['value']<>"") { echo $table['value']['group_name']; } ?></option>
    			
    				<?php foreach($table['group'] as $rowgroup): ?>
                    <option value="<?php echo $rowgroup['id']; ?>"><?php echo $rowgroup['group_name']; ?></option>
                <?php endforeach;?>
            </select>
            <br />
            <?php if($table['value']==""): ?>
			<label class="form-label"><?php echo $this->lang->line('user_password'); ?></label>
			<input id="form-password" class="form-field width60" name="password" type="password" value="" maxlength="100"/>
			
			<label class="form-label"><?php echo $this->lang->line('con_password'); ?></label>
		 	<input id="form-confirmpassword" class="form-field width60" name="password_confirm" type="password" value="" maxlength="100"/>
			<?php endif;?>
            
			<label class="form-label"><?php echo $this->lang->line('email'); ?></label>
			<input id="form-email" class="form-field width60" name="email" type="text" value="<?php if($table['value']<>"") { echo $table['value']['email']; } ?>" maxlength="100"/>
			
			<label class="form-label"><?php echo $this->lang->line('con_email'); ?></label>
			<input id="form-confirmemail" class="form-field width60" name="email_confirm" type="text" value="<?php if($table['value']<>"") { echo $table['value']['email']; } ?>" maxlength="100"/>
            
            <label class="form-label"><?php echo $this->lang->line('tlp'); ?></label>
			<input id="form-tlp" class="form-field width60" name="tlp" type="text" value="<?php if($table['value']<>"") { echo $table['value']['tlp']; } ?>" maxlength="100"/>
			
			<label class="form-label"><?php echo $this->lang->line('address'); ?></label>
			<input id="form-tlp" class="form-field width90" name="tlp" type="text" value="<?php if($table['value']<>"") { echo $table['value']['address']; } ?>" maxlength="100"/>
   
			
			<label class="form-label"> Status (Click One Item ) </label>
			<p class="radiocheck">
			<input id="status_eu" type="radio" value="Menikah" name="status" <?php if($table['value']<>"") { if($table['value']['status']=='Menikah') { echo 'checked="checked"';  }  } ?>/>
			<label for="status_eu">Menikah</label>
	
			<input id="status_am" type="radio" value="Belum Menikah" name="status" <?php if($table['value']<>"") { if($table['value']['status']=='Belum Menikah') { echo 'checked="checked"';  }  } ?> />
			<label for="status_am">Belum Menikah</label>
			</p>
            
           	<label class="form-label"><?php echo $this->lang->line('city'); ?></label>
			<input id="form-city" class="form-field width60" name="city" type="text" value="<?php if($table['value']<>"") { echo $table['value']['city']; } ?>" maxlength="100"/>
            
            <label class="form-label"><?php echo $this->lang->line('zipcode'); ?></label>
			<input id="form-zip" class="form-field width60" name="zipcode" type="text" value="<?php if($table['value']<>"") { echo $table['value']['zip_code']; } ?>" maxlength="50"/>
			
            <label class="form-label"><?php echo $this->lang->line('hobby'); ?></label>
			<textarea id="form-message" class="form-field width90" name="hobby" cols="" rows="2"><?php if($table['value']<>"") { echo $table['value']['hobby']; } ?></textarea>
			
			<input id="reset" class="button red" type="button" value="Reset" name="reset" />
			<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
		</form>
		</div>

		</div>	
			
	</div>

	
	<div class="column half fr">
		<div class="box themed_box">

		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo $this->lang->line('pos'); ?></h2>
			
			<div class="box-content box-table">
			
            <?php echo $this->session->flashdata('message2'); ?>
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('pos'); ?></th>
						<th><?php echo $this->lang->line('status'); ?></th>
						<th class="tc"></th>
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php $i=1; ?>
					<?php foreach($table['pos'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td class="width80">
							<h5><?php echo $rec['pos_name']; ?></h5>
		
						</td>
						<td class="tc">

							<span class="bullet bullet-green"></span>
						</td>
						<td class="tc">
						<a class="button themed openable"><span class="icon_single extend"></span></a>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<?php echo form_open($this->config->item('update_pos')); ?>
                        <td colspan="4">
							<div class="fl typo">
							<b><?php $this->config->item('pos'); ?></b>
							<p class="p_justify">
                              <input id="form-id" name="id" type="hidden" value="<?php echo $rec['id']; ?>" />
							  <input id="form-name" class="form-field width150" name="name" type="text" value="<?php echo $rec['pos_name']; ?>" maxlength="200"/>
							</p>
							</div>

							<div class="fl typo">
								<b>Published by: </b>
								<a href="#"><?php echo $rec['user_stamp']; ?></a> 
							</div>

							
							<div class="s_3"></div>
							
							<div class="fl typo">
								<b>Published date: </b>
                                <?php if($rec['date_stamp']=='0000-00-00'): ?>
                                    -
                                <?php else: ?>
								<a href="#"><?php echo $rec['date_stamp']; ?></a>
                                <?php endif; ?> 
							</div>
						
							<div class="fr">
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('delete');?>" name="delete" />
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						<?php echo form_close();?>
						<div class="clear"></div>
						</td>
					</tr>
                    <?php $i++; endforeach;?>
					
                    <tr>
						<td class="width80">
							<h5><?php echo $this->lang->line('add'); ?></h5>
		
						</td>
						<td class="tc">

							
						</td>
						<td class="tc">
						<a class="button themed openable"><span class="icon_single extend"></span></a>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<td colspan="4">
                        <?php echo form_open($this->config->item('add_pos')); ?>
							<div class="fl typo">
							<b><?php $this->config->item('pos'); ?></b>
							<p class="p_justify">
							  <input id="form-name" class="form-field width150" name="name" type="text" value="" maxlength="200"/>
							</p>
							</div>

							<div class="s_3"></div>
							
												
							<div class="fr">
								<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						
						<div class="clear"></div>
                        <?php echo form_close();?>
						</td>
					</tr>
                    
				</tbody>
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
		</div>
        
        <div class="box themed_box">

		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo $this->lang->line('division'); ?></h2>
			
			<div class="box-content box-table">
			
            <?php echo $this->session->flashdata('message20'); ?>
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('division'); ?></th>
						<th><?php echo $this->lang->line('status'); ?></th>
						<th class="tc"></th>
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php $i=1; ?>
					<?php foreach($table['division'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td class="width80">
							<h5><?php echo $rec['div_name']; ?></h5>
						</td>
						<td class="tc">
							<span class="bullet bullet-green"></span>
						</td>
						<td class="tc">
						
						</td>
					</tr>
                        <?php $i=$i+1; ?>
    					<?php foreach($table['users'] as $user): ?>
                        <?php if($user['division_id']==$rec['div_id']): ?>
                        <?php if($user['enabled']== 1 ): ?>
                        <?php if($i % 2 == 0): 
                                $zebra="odd";
                              else: 
                                $zebra="even";
                              endif;
                        ?>
                        <tr class="<?php echo $zebra;?>">
    						<td class="width80">
    							<h5>&nbsp;&nbsp;-&nbsp;<?php echo $user['username']; ?></h5>
    						</td>
    						<td class="tc">
    							<h5><?php echo $user['pos_name']; ?></h5>
    						</td>
    						<td class="tc">
    						
    						</td>
    					</tr>
                        <?php $i++; endif;  endif; ?>
                        
                        <?php  endforeach;?>
                        <?php $i--; ?>
                        
                    <?php $i++; endforeach;?>
					
                    
                    
				</tbody>
			</table>
            
			</div>
		</div>		
        			
	</div>